//
//  WPieChartView.h
//  WPieChart
//
//  Created by winter on 16/1/5.
//  Copyright © 2016年 winter. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface WPieChartDataItem : NSObject

@property (nonatomic, strong) UIColor *color;
@property (nonatomic, assign) CGFloat value;
@property (nonatomic, assign) CGFloat amplifyValue;

+ (instancetype)dataItemWithValue:(CGFloat)value color:(UIColor*)color;
@end

@interface WPieChartView : UIView

/** 是否动画. 默认 YES. **/
@property (nonatomic) BOOL displayAnimated;
/** 是否为空心同轴 默认空心同轴 */
@property (nonatomic, getter=isConcentric) BOOL concentric;
/** 外圆 radius */
@property (nonatomic) CGFloat outerCircleRadius;
/** 内圆 radius 默认 小于外圆半径 20pt */
@property (nonatomic) CGFloat innerCircleRadius;

/** 数据 */
@property (nonatomic, strong) NSArray<WPieChartDataItem *>  *items;

- (instancetype)initWithFrame:(CGRect)frame items:(NSArray<WPieChartDataItem *> *)items;

/** 添加 一个新的 pieChart */
- (void)addPieChartItem:(WPieChartDataItem *)item;
/** 插入 一个新的 pieChart */
- (void)insertPieChartItem:(WPieChartDataItem *)item atIndex:(NSInteger)index;

/** 放大某一个 pieChart */
- (void)amplifyPieChartWithIndex:(NSInteger)index amplifyValue:(CGFloat)amplifyValue;
@end

